import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class LC1185 {

    public static void main(String[] args) {

    }

    public String dayOfTheWeek(int day, int month, int year) {
        String[] weeks = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
        SimpleDateFormat fmt = new SimpleDateFormat("dd MM yyyy");

        Date d = null;
        try {
            d = fmt.parse(day+" "+month+" "+year);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }

        Calendar cal = Calendar.getInstance();

        cal.setTime(d);

        int weekDay = cal.get(Calendar.DAY_OF_WEEK);
        return weeks[weekDay-1];
    }
}
